package com.loongtech.bi.action.system;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.loongtech.bi.entity.system.EntityGameParamType;
import com.loongtech.bi.manager.system.SysLogManager;
import com.loongtech.bi.support.Session;

/**
 * 流水查询配置
 * 
 * @author marin
 * @date 2015-09-29
 */
@Controller
@Scope("view")
public class FlowQueryConfigAction {
	private FlowQueryTable entity;
	private List<FlowQueryTable> list;
	private FlowQueryTable selectedConfig;

	@Autowired
	private Session session;
	@Autowired
	private SysLogManager sysLogManager;

	@Autowired
	public void init() {
		sysLogManager.addLog(session.getUserName(), "流水查询配置");
		initData();
	}

	private void initData() {
		entity = new FlowQueryTable();
		list = new ArrayList<>();
	}

	public void add() {
		list.add(entity);
	}

	public void modify(EntityGameParamType e) {
	}

	public void delete(int id) {
	}

	public class FlowQueryTable {
		private int sequence; // 用于排序
		private String name; // 查询名称
		private String tableName; // 查询表名
		private String desc; // 查询描述
		private long createTimestamp; // 建立时间
		private String sortStr; // 排序字符串

		public int getSequence() {
			return sequence;
		}

		public void setSequence(int sequence) {
			this.sequence = sequence;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public String getTableName() {
			return tableName;
		}

		public void setTableName(String tableName) {
			this.tableName = tableName;
		}

		public String getDesc() {
			return desc;
		}

		public void setDesc(String desc) {
			this.desc = desc;
		}

		public long getCreateTimestamp() {
			return createTimestamp;
		}

		public void setCreateTimestamp(long createTimestamp) {
			this.createTimestamp = createTimestamp;
		}

		public String getSortStr() {
			return sortStr;
		}

		public void setSortStr(String sortStr) {
			this.sortStr = sortStr;
		}
	}

	public FlowQueryTable getEntity() {
		return entity;
	}

	public void setEntity(FlowQueryTable entity) {
		this.entity = entity;
	}

	public List<FlowQueryTable> getList() {
		return list;
	}

	public void setList(List<FlowQueryTable> list) {
		this.list = list;
	}

	public FlowQueryTable getSelectedConfig() {
		return selectedConfig;
	}

	public void setSelectedConfig(FlowQueryTable selectedConfig) {
		this.selectedConfig = selectedConfig;
	}
}
